import { post } from '@/core/utils/http';
import type { Response } from '@/core/models';

/**  获取分销商进度状态 */
export const queryDistributionInfo = (data ?: any) : Promise<Response<any>> => {
	return post('Api/Distribution/Info', { data, }, true);
}

/**  申请分销商 */
export const queryApplyDistribution = (data : any) : Promise<Response<any>> => {
	return post('Api/Distribution/ApplyDistribution', { data, }, true);
}

/**  分销团队统计 */
export const queryTeamSum = () : Promise<Response<any>> => {
	return post('Api/Distribution/GetTeamSum', {}, true);
}

/**  获取店铺信息 */
export const queryDistributionStoreInfo = (data : any) : Promise<Response<any>> => {
	return post('Api/Distribution/GetStoreInfo', {
		data,
	});
}

/**  获取我的上级邀请人 */
export const queryDistributionMyInvite = () : Promise<Response<any>> => {
	return post('Api/User/GetMyInvite', {}, true);
}

/**  用户推荐列表 */
export const queryDistributionRecommend = (data : any) : Promise<Response<any>> => {
	return post('Api/User/Recommend', { data, }, true);
}

/**  我的分销订单 */
export const queryDistributionOrder = (data : any) : Promise<Response<any>> => {
	return post('Api/Distribution/MyOrder', { data, }, true);
}

/**  分销订单统计 */
export const queryDistributionOrderSum = () : Promise<Response<any>> => {
	return post('Api/Distribution/GetOrderSum', {}, true);
}

/**  获取分销商排行 */
export const queryDistributionRanking = (data : any) : Promise<Response<any>> => {
	return post('Api/Distribution/getDistributionRanking', { data, }, true);
}

/**  店铺设置 */
export const querySetStore = (data : any) : Promise<Response<any>> => {
	return post('Api/Distribution/SetStore', { data, }, true);
}